<%--
  Created by IntelliJ IDEA.
  User: Somnus远哥
  Date: 2021/9/15
  Time: 15:57
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>

    <meta charset="utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1"/>
    <meta name="description" content="description of your site"/>
    <meta name="author" content="author of the site"/>
    <title>电商平台后台首页</title>
    <link rel="stylesheet" href="../css/bootstrap.css"/>
    <link rel="stylesheet" href="../css/bootstrap-responsive.css"/>
    <link rel="stylesheet" href="../css/styles.css"/>
    <link rel="stylesheet" href="../css/toastr.css"/>
    <link rel="stylesheet" href="../css/fullcalendar.css"/>
    <script src="../js/jquery.min.js"></script>
    <script src="../js/bootstrap.js"></script>
    <script src="../js/jquery.knob.js"></script>
    <script src="http://d3js.org/d3.v3.min.js"></script>
    <%--    <script src="js/jquery.sparkline.min.js"></script>--%>
    <script src="../js/toastr.js"></script>
    <script src="../js/jquery.tablesorter.min.js"></script>
    <script src="../js/jquery.peity.min.js"></script>
    <script src="../js/fullcalendar.min.js"></script>
    <script src="../js/gcal.js"></script>
    <script src="../js/setup.js"></script>
    <script>
        /*function del(id){
            if(confirm("确定删除这条数据么？")){
                // 删除
                if(confirm("再次确认删除这条数据么？")){
                    // 再次确认后删除
                    window.location.href = "delete?id=" + id;
                }
            }
        }
        function reset(id) {
            if(confirm("确定要重置密码么？")){
                window.location.href = "resetPassword?id=" + id;
            }
        }*/
    </script>
</head>
<body>
<%@include file="../header.jsp"%>
<div class="page">
    <div class="page-container">
        <div class="container">
            <div class="row">
                <div class="span12">
                    <h4 class="header">用户列表</h4>
                    <table class="table table-striped sortable">
                        <thead>
                        <tr>
                            <th>用户ID</th>
                            <th>用户名</th>
                            <th>密码</th>
                            <th>手机号</th>
                            <th>送货地址</th>
                            <th>用户状态</th>
                            <th>创建时间</th>
                            <th>修改时间</th>
                        </tr>
                        </thead>
                        <tbody>
                        <c:forEach items="${users}" var="user">
                            <tr>
                                <td>${user.id}</td>
                                <td>${user.username}</td>
                                <td>${user.password}</td>
                                <td>${user.phone}</td>
                                <td>${user.address}</td>
                                <td>${user.status}</td>
                                <td>${user.createTime}</td>
                                <td>${user.updateTime}</td>
                                <td>
                                    <div class="btn-group">
                                        <button class="btn">操作</button>
                                        <button data-toggle="dropdown" class="btn dropdown-toggle">
                                            <span class="caret"></span>
                                        </button>
                                        <ul class="dropdown-menu">
                                            <li>
                                                <a href="updateStatus?id=${user.id}">修改用户状态</a>
                                            </li>
                                        </ul>
                                    </div>
                                </td>
                            </tr>
                        </c:forEach>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>
<%@include file="../footer.jsp"%>
</body>
<script src="../js/d3-setup.js"></script>
</html>
